REPLICATION DATA FOR: THE ECONOMICS OF GREEN BUILDING

Please load new dataset for each table. Outreg2 command has been added to generate tables (ensure "outreg2" package has been installed).

//Run this program to define edvreg//

version 6.0

tempvar svar dvv varCorr

syntax varlist [if] [in], Dvste(string) [Prop] [borjas] [cluster(varlist)] [hc3]   [Level(integer 95)]

local indvars "`varlist'"

if "`cluster'"~="" {

  local cluster="cluster(`cluster')"

}

gettoken depvar indvars : indvars

qui gen `dvv' = `dvste'*`dvste' `if'`in'

disp

disp in green "Sampled dependent variable regression"

disp

if ("`prop'" == "") {

      qui gen `svar' = sum(`dvv')

      local swsq = `svar'[_N]

      qui reg `depvar' `indvars' `if'`in', level(`level') `cluster' `hc3' 

      local dof = e(df_r)

      local sumsr = `dof'*e(rmse)*e(rmse)

      qui matrix accum XpX  = `indvars' `if' `in'

      qui matrix accum XpGX = `indvars' [iw=`dvv'] `if' `in'

      matrix tr = trace(inv(XpX)*XpGX)

      *following line modified by E. leoni

      local sigma2 = (`sumsr'-`swsq') / `dof'      

      if ("`borjas'"=="") {

        /* apply hanushek weights */

        local sigma2 = (`sumsr'-`swsq'+tr[1,1]) / `dof' 

      }

      if (`sigma2' < 0) {local sigma2 = 0}

      disp in green "Estimated Sigma     = " in yellow %7.5f sqrt(`sigma2')

      disp in green "Mean Omega2         = " in yellow %7.5f sqrt(`swsq'/`dof')

      qui gen `varCorr' = (1/(`sigma2'+`dvv')) `if'`in'

      /* gen w=1/(`varCorr') */

        regress `depvar' `indvars'  `if'`in' [aw=`varCorr'],  `cluster' `hc3' level(`level')

    }

   else {

     tempvar e v

      qui reg `depvar' `indvars'  `if'`in', level(`level') `cluster' `hc3'

      predict `e' if e(sample), resid

      replace `e' = `e'*`e'

      qui reg `e' `dvv' `if'`in',  level(`level') `cluster' `hc3'

      if (_b[_cons]>0) {

         disp in green "Coeff. on variance from sampling = " _continue

         disp in yellow %7.4f _b[`dvv'] " (" %7.4f _se[`dvv'] ")"

         disp in green "   Estimated variance of epsilon = " _continue

         disp in yellow %7.4f _b[_cons] " (" %7.4f _se[_cons] ")"

      }

      else {

        qui reg `e' `dvv' `if'`in',   nocons level(`level') `cluster' `hc3'

         disp in green "Coeff. on variance from sampling = " _continue

         disp in yellow %7.4f _b[`dvv'] " (" %7.4f _se[`dvv'] ")"

         disp in green "             Variance of epsilon = " _continue

         disp in yellow %7.4f 0 in blue " (constraint imposed)"

       }

      predict `v' if e(sample)

     regress `depvar' `indvars'  `if'`in' [aw=1/`v'],  `cluster' `hc3' level(`level')

   }

end

//START//
// Table 1
// Columns

clear 
use "Data/Table 1.dta"

reg delta_rent green_07_09 delta_vacancy renovated_07_09 , robust
outreg2 delta_vacancy renovated_07_09  green_07_09 using table1a, /*
*/ se bracket ctitle("(1)") addstat(Adj R2, e(r2_a)) word replace

reg delta_rent green_07_09 delta_vacancy renovated_07_09  logsize occupancy_07_09 class_a class_b contract_net  emplgr_06_08 age_10 age_10_20 age_20_30 age_30_40 renovated story_medium story_high amenities, robust
outreg2 delta_vacancy renovated_07_09  green_07_09 logsize occupancy_07_09 class_a class_b contract_net  emplgr_06_08 age_10 age_10_20 age_20_30 age_30_40 renovated story_medium story_high amenities using table1a, /*
*/ se bracket ctitle("(2)") addstat(Adj R2, e(r2_a)) word append

reg delta_rent green_07_09 delta_vacancy renovated_07_09  logsize occupancy_07_09 class_a class_b contract_net  emplgr_06_08 age_10 age_10_20 age_20_30 age_30_40 renovated story_medium story_high amenities id_* , robust
outreg2 delta_vacancy renovated_07_09  green_07_09 logsize occupancy_07_09 class_a class_b contract_net  emplgr_06_08 age_10 age_10_20 age_20_30 age_30_40 renovated story_medium story_high amenities using table1a, /*
*/ se bracket ctitle("(3)") addstat(Adj R2, e(r2_a)) word append

reg delta_effrent green_07_09 delta_vacancy renovated_07_09  , robust
outreg2 delta_vacancy renovated_07_09  green_07_09 using table1a, /*
*/ se bracket ctitle("(4)") addstat(Adj R2, e(r2_a)) word append

reg delta_effrent green_07_09 delta_vacancy renovated_07_09  logsize  class_a class_b contract_net  emplgr_06_08 age_10 age_10_20 age_20_30 age_30_40 renovated story_medium story_high amenities, robust
outreg2 delta_vacancy renovated_07_09  green_07_09 logsize  class_a class_b contract_net  emplgr_06_08 age_10 age_10_20 age_20_30 age_30_40 renovated story_medium story_high amenities using table1a, /*
*/ se bracket ctitle("(5)") addstat(Adj R2, e(r2_a)) word append

reg delta_effrent green_07_09 delta_vacancy renovated_07_09  logsize  class_a class_b contract_net  emplgr_06_08 age_10 age_10_20 age_20_30 age_30_40 renovated story_medium story_high amenities id_* , robust
outreg2 delta_vacancy renovated_07_09  green_07_09 logsize  class_a class_b contract_net  emplgr_06_08 age_10 age_10_20 age_20_30 age_30_40 renovated story_medium story_high amenities using table1a, /*
*/ se bracket ctitle("(6)") addstat(Adj R2, e(r2_a)) word append

// Table 2
// Columns 1-3

clear
use "Data/Table 2 (Columns 1-3) and Table 3 (Columns 1-4).dta"

tabstat  rent effectiverent size occupancy class_a class_b class_c age  renovated stories amenities publictransport emplgr_06_08 triplenet modifiedgross plusallutilities gross /*
*/   if green==1, statistics(mean sd) columns(stat) format(%9.4f) noseparator

tabstat  rent effectiverent size occupancy class_a class_b class_c age  renovated stories  amenities publictransport emplgr_06_08 triplenet modifiedgross plusallutilities gross /*
*/   if green==0, statistics(mean sd) columns(stat) format(%9.4f) noseparator

tabstat  rent effectiverent size occupancy class_a class_b class_c age renovated stories  amenities publictransport emplgr_06_08 triplenet modifiedgross plusallutilities gross /*
*/   if green==0 [w=psc], statistics(mean sd) columns(stat) format(%9.4f) noseparator

// Columns 4-6

clear 
use "Table 2 (Columns 4 - 6) and Table 3 (Columns 5 - 6).dta"

tabstat  price_sqft size_sale class_a class_b class_c age renovated stories amenities publictransport  emplgr_06_08 /*
*/   if green==1, statistics(mean sd count) columns(stat) format(%9.4f) noseparator

tabstat  price_sqft size_sale class_a class_b class_c age  renovated stories amenities publictransport  emplgr_06_08 /*
*/   if green==0, statistics(mean sd count) columns(stat) format(%9.4f) noseparator

tabstat  price_sqft size_sale class_a class_b class_c age  renovated stories  amenities publictransport  emplgr_06_08 /*
*/   if green==0 [w=psc], statistics(mean sd count) columns(stat) format(%9.4f) noseparator

// Table 3
// Columns 1-2

clear
use "Data/Table 2 (Columns 1-3) and Table 3 (Columns 1-4).dta"

reg logrent green i_gross i_modifiedgross i_plusallutilities logsize occupancy class_a class_b gross modifiedgross plusallutilities emplgr_06_08 age_0_5 age_5_10 age_10_20 age_20_30 age_30_40 renovated story_medium story_high amenities publictransport id_* [w = psc]
outreg2 green i_gross i_modifiedgross i_plusallutilities logsize occupancy class_a class_b gross modifiedgross plusallutilities emplgr_06_08 age_0_5 age_5_10 age_10_20 age_20_30 age_30_40 renovated story_medium story_high amenities publictransport using table1, /*
*/ se bracket ctitle("(1)") addstat(Adj R2, e(r2_a)) word bdec(3) replace

reg logrent energystar decay_energy_star leed logsize occupancy class_a class_b gross modifiedgross   plusallutilities emplgr_06_08 age_0_5 age_5_10 age_10_20 age_20_30 age_30_40 renovated story_medium story_high amenities publictransport id_* [w = psc]
outreg2 energystar decay_energy_star leed logsize occupancy class_a class_b gross modifiedgross   plusallutilities emplgr_06_08 age_0_5 age_5_10 age_10_20 age_20_30 age_30_40 renovated story_medium story_high amenities publictransport using table1, /*
*/ se bracket ctitle("(2)") addstat(Adj R2, e(r2_a)) word bdec(3) append

// Columns 3-4

reg effrent green  i_gross i_modifiedgross i_plusallutilities logsize class_a class_b gross modifiedgross   plusallutilities emplgr_06_08 age_0_5 age_5_10 age_10_20 age_20_30 age_30_40 renovated story_medium story_high amenities publictransport id_* [w = psc]
outreg2 green i_gross i_modifiedgross i_plusallutilities logsize  class_a class_b gross modifiedgross   plusallutilities emplgr_06_08 age_0_5 age_5_10 age_10_20 age_20_30 age_30_40 renovated story_medium story_high amenities publictransport using table1, /*
*/ se bracket ctitle("(3)") addstat(Adj R2, e(r2_a)) word bdec(3) append

reg effrent energystar decay_energy_star leed logsize  class_a class_b gross modifiedgross   plusallutilities emplgr_06_08 age_0_5 age_5_10 age_10_20 age_20_30 age_30_40 renovated story_medium story_high amenities publictransport id_* [w = psc]
outreg2 energystar decay_energy_star leed logsize  classa classb gross modifiedgross   plusallutilities emplgr_06_08 age_0_5 age_5_10 age_10_20 age_20_30 age_30_40 renovated story_medium story_high amenities publictransport using table1, /*
*/ se bracket ctitle("(4)") addstat(Adj R2, e(r2_a)) word bdec(3) append

// Columns 5-6

clear 
use "Table 2 (Columns 4 - 6) and Table 3 (Columns 5 - 6).dta"

reg logprice green logsize class_a class_b emplgr_06_08 age_0_5 age_5_10 age_10_20 age_20_30 age_30_40 renovated story_medium story_high amenities publictransport y_05 y_06 y_07 y_08 y_09 id_* [w = psc]
outreg2 green logsize class_a class_b emplgr_06_08 age_0_5 age_5_10 age_10_20 age_20_30 age_30_40 renovated story_medium story_high amenities publictransport y_05 y_06 y_07 y_08 y_09 using table4, /*
*/ se bracket ctitle("(3)") addstat(Adj R2, e(r2_a)) word append

reg logprice energystar decay_energy_star leed  logsize class_a class_b emplgr_06_08 age_0_5 age_5_10 age_10_20 age_20_30 age_30_40 renovated story_medium story_high amenities publictransport y_05 y_06 y_07 y_08 y_09 id_* [w = psc]
outreg2 energystar decay_energy_star leed  logsize class_a class_b emplgr_06_08 age_0_5 age_5_10 age_10_20 age_20_30 age_30_40 renovated story_medium story_high amenities publictransport  y_05 y_06 y_07 y_08 y_09 using table4, /*
*/ se bracket ctitle("(4)") addstat(Adj R2, e(r2_a)) word append

// Table 5
// Panel A

clear
use "Table 5 (Panel A) and Table 6 (Panel A).dta"

edvreg beta certified leed_score_norm leed2 if  beta >-2 & beta <2 , dvste(se)
outreg2 certified leed_score_norm leed2 using table1, /*
*/ se bracket ctitle("(5)") addstat(Adj R2, e(r2_a)) word append

edvreg beta certified leed_score_norm leed2 energystar if  beta >-2 & beta <2 , dvste(se)
outreg2 certified leed_score_norm leed2 energystar using table1, /*
*/ se bracket ctitle("(6)") addstat(Adj R2, e(r2_a)) word append

edvreg beta certified leed_score_norm leed2 leed3 if  beta >-2 & beta <2 , dvste(se)
outreg2 certified leed_score_norm leed2 leed3 using table1, /*
*/ se bracket ctitle("(5)") addstat(Adj R2, e(r2_a)) word append

edvreg beta certified leed_score_norm leed2 leed3 energystar if  beta >-2 & beta <2 , dvste(se)
outreg2 certified leed_score_norm leed2 leed3 energystar using table1, /*
*/ se bracket ctitle("(6)") addstat(Adj R2, e(r2_a)) word append

// Panel B

clear 
use "Table 5 (Panel B) and Table 6 (Panel B).dta"

edvreg beta certified leed_points_norm leed2 if  beta >-2 & beta <2 , dvste(se)
outreg2 certified leed_points_norm leed2 using table1, /*
*/ se bracket ctitle("(11)") addstat(Adj R2, e(r2_a)) word append

edvreg beta certified leed_points_norm leed2 energystar if  beta >-2 & beta <2 , dvste(se)
outreg2 certified leed_points_norm leed2 energystar using table1, /*
*/ se bracket ctitle("(12)") addstat(Adj R2, e(r2_a)) word append

edvreg beta certified leed_points_norm leed2 leed3 if  beta >-2 & beta <2 , dvste(se)
outreg2 certified leed_points_norm leed2 leed3 using table1, /*
*/ se bracket ctitle("(11)") addstat(Adj R2, e(r2_a)) word append

edvreg beta certified leed_points_norm leed2 leed3 energystar if  beta >-2 & beta <2 , dvste(se)
outreg2 certified leed_points_norm leed2 leed3 energystar using table1, /*
*/ se bracket ctitle("(12)") addstat(Adj R2, e(r2_a)) word append

// Table 6
// Panel A

clear
use "Table 5 (Panel A) and Table 6 (Panel A).dta"

edvreg beta site_td if beta>-2 & beta<2, dvste(se)
outreg2 site_td using table4, /*
*/ se bracket ctitle("(1)") addstat(Adj R2, e(r2_a)) word replace

edvreg beta site_td certified if beta>-2 & beta<2, dvste(se)
outreg2 site_td certified using table4, /*
*/ se bracket ctitle("(3)") addstat(Adj R2, e(r2_a)) word append

edvreg beta utility_sqft_td if beta>-2 & beta<2 &utility_sqft_td<2, dvste(se)
outreg2 utility_sqft_td using table4, /*
*/ se bracket ctitle("(7)") addstat(Adj R2, e(r2_a)) word append

edvreg beta utility_sqft_td certified if beta>-2 & beta<2 &utility_sqft_td<2, dvste(se)
outreg2 utility_sqft_td certified using table4, /*
*/ se bracket ctitle("(8)") addstat(Adj R2, e(r2_a)) word append

// Panel B

clear 
use "Table 5 (Panel B) and Table 6 (Panel B).dta"

edvreg beta site_td  if beta>-2 & beta<2, dvste(se)
outreg2 site_td using table3, /*
*/ se bracket ctitle("(1)") addstat(Adj R2, e(r2_a)) word replace

edvreg beta site_td certified if beta>-2 & beta<2, dvste(se)
outreg2 site_td certified using table3, /*
*/ se bracket ctitle("(2)") addstat(Adj R2, e(r2_a)) word append

edvreg beta utility_sqft_td if beta>-2 & beta<2, dvste(se)
outreg2 utility_sqft_td using table3, /*
*/ se bracket ctitle("(7)") addstat(Adj R2, e(r2_a)) word append

edvreg beta utility_sqft_td certified if beta>-2 & beta<2, dvste(se)
outreg2 utility_sqft_td certified  using table3, /*
*/ se bracket ctitle("(8)") addstat(Adj R2, e(r2_a)) word append

//END//